//
//  XXcrackServerRequest.m
//  MacStockApp
//
//  Created by Andy MacPro on 12/11/22.
//
//

#import "XXcrackServerRequest.h"
#import "XXdevice_Information.h"

@implementation XXcrackServerRequest

+(NSMutableURLRequest *)Yahoo_Mobile_Crack_Request:(NSURL *)url{
    
    NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] initWithURL:url]
                                    autorelease];
    
    [request setValue:@" id=""6693""; make=""Apple""; model=""iPhone""; os=""iPhone OS""; osver=""6.0.1""" forHTTPHeaderField:@"X-Device-Info"];
    
    [request setValue:@" BA4672C3-7B26DA55" forHTTPHeaderField:@"X-Request-Id"];
    

#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
    //iOS
    [request setValue:@"EE627142-0F77-4870-AFBF-D063327BDDCB" forHTTPHeaderField:@"X-Device-Udid"];
#else
    //OSX 因為mac的比較短
    
    NSString *mac_udid=[XXdevice_Information Device_UniqueIdentifier];
    
    [request setValue:mac_udid forHTTPHeaderField:@"X-Device-Udid"];
#endif   
    
    [request setValue:@" */*" forHTTPHeaderField:@"Accept"];
    [request setValue:@" zh-tw" forHTTPHeaderField:@"Accept-Encoding"];
    [request setValue:@" keep-alive" forHTTPHeaderField:@"Cookie"];
    [request setValue:@" BA4672C3-7B26DA55" forHTTPHeaderField:@"Connection"];
    [request setValue:@"YahooMobile/1.0 (iPhone Finance; 1.3.6) (Apple; iPhone; iPhone OS/6.0.1)" forHTTPHeaderField:@"User-Agent"];     
    
    return request;
    
}

//無法破解
+(NSMutableURLRequest *)Safari_Crack_Request:(NSURL *)url{
    NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] initWithURL:url]
                                    autorelease];
    
    [request setValue:@"http://www.bloomberg.com/markets/companies/" forHTTPHeaderField:@"Referer"];
    
    
     [request setValue:@"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" forHTTPHeaderField:@"Accept"];
    
    
     [request setValue:@"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17" forHTTPHeaderField:@"User-Agent"];
    [request setValue:@"NREUM=s=1356915879247&r=92585&p=65541; _chartbeat2=xh7rehcuvpuccdlx.1356783410287.1356915840948.00000000000001; __utma=30057196.2091636429.1356915833.1356915833.1356915833.1; __utmb=30057196.4.9.1356915839741; __utmc=30" forHTTPHeaderField:@"Cookie"];    
    
    
    return request;

}

@end
